<template>
  <div class="infinite-container greenTop">
    <select-role2 @familychang="familychangHandle" :showCardNumber="false" :showAllCards="false"></select-role2>
    <confirm-id :familyPerson="familyPerson" :person="person" :show.sync="showConfirm"></confirm-id>
    <div v-show="showData">
      <white-block>
        <mu-flexbox slot="content" jusify="space-between" class="pd10" @click.native="to('检验报告')">
          <mu-flexbox-item  :grow="0" basis="60px">
            <i class="w-icon w-icon-bgcx_jcbg v-middle inline-block"></i>
          </mu-flexbox-item>
          <mu-flexbox-item>
            检验报告
          </mu-flexbox-item>
          <mu-flexbox-item :grow="0" basis="2em">
            <div class="iconfont icon-small-arrow-right t3"/>
          </mu-flexbox-item>
        </mu-flexbox>
        <mu-divider />
        <mu-flexbox slot="content" jusify="space-between" class="pd10" @click.native="to('检查报告')">
          <mu-flexbox-item  :grow="0" basis="60px">
            <i class="w-icon w-icon-bgcx_jybg v-middle inline-block"></i>
          </mu-flexbox-item>
          <mu-flexbox-item>
            检查报告
          </mu-flexbox-item>
          <mu-flexbox-item :grow="0" basis="2em">
            <div class="iconfont icon-small-arrow-right t3"/>
          </mu-flexbox-item>
        </mu-flexbox>
      </white-block>
      <ul class="bottomTip f12">
        <li>可查询一年之内的所有检查检验单</li>
        <li class="mt10">1.检验：查看血常规、尿检等生化类报告单信息</li>
        <li>2.检查：查看CT、MRI（磁共振）、X光、B超等检查类报告信心</li>
        <li>3.报告仅作参考，以医院实际纸质报告为准</li>
      </ul>
    </div>
  </div>
</template>

<script>
  import SelectRole2 from '../../components/SelectRole2'
  import whiteBlock from '../../components/whiteBlock'
  import confirmId from '../../components/confirmId'
  // import {RESTFUL_API, commonAjax} from '@/api/api'
  export default {
    data () {
      return {
        familyPerson: JSON.parse(sessionStorage.familyPerson || '{}'),
        person: JSON.parse(sessionStorage.person || '{}'),
        showConfirm: false,
        showData: true,
        selectedPerson: '请选择就诊人'
      }
    },
    components: {
      whiteBlock, confirmId, SelectRole2
    },
    mounted () {
      sessionStorage.checkType = this.$route.query.type || '1'
      this.showConfirm = this.familyPerson.certificationValidityPeriod !== '1'
      this.showData = !this.showConfirm
    },
    methods: {
      familychangHandle (f) {
        this.familyPerson = f
        // this.queryAccount()
      },
      to (param) {
        let path = ''
        if (param === '检验报告') {
          path = '/mainReportRecord/jyList'
        } else if (param === '检查报告') {
          path = '/mainReportRecord/jcList'
        }
        this.$router.push({
          path: path
        })
      }
    },
    beforeDestroy () {
    }
  }
</script>

<style scoped lang="less">
  @import "../../common/css/flex.css";
  @import "../../common/css/vars";
</style>
